package cn.zyq.ykb.beans.user;

import cn.zyq.ykb.system.common.BaseBean;
import cn.zyq.ykb.system.common.Operator;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.*;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * user对象 user
 *
 * @author SystemAuth
 * @date 2023-05-23
 */
@Data
@Entity
@Table(name = "`user`")
@JsonInclude(value = JsonInclude.Include.NON_NULL)
public class User  extends BaseBean implements Operator,Serializable {
    /**
     * 主键id，用于关联
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY, generator = "JDBC")
    @Column(name = "`userID`")
    @ApiModelProperty("主键id，用于关联")
    private Integer userID;
    /**
     * 头像
     */
    @Column(name = "`avatar`")
    @ApiModelProperty("头像")
    private String avatar;
    /**
     * 昵称
     */
    @Column(name = "`nickName`")
    @ApiModelProperty("昵称")
    private String nickName;
    /**
     * 手机号
     */
    @Column(name = "`phone`")
    @ApiModelProperty("手机号")
    private String phone;
    /**
     * 用户级别（1普通用户，2钻石用户，3团队长，4服务商）
     */
    @Column(name = "`position`")
    @ApiModelProperty("用户级别（1普通用户，2钻石用户，3团队长，4服务商）")
    private Integer position;
    /**
     * 邀请码
     */
    @Column(name = "`code`")
    @ApiModelProperty("邀请码")
    private String code;
    /**
     * 钻石邀请码
     */
    @Column(name = "`zsCode`")
    @ApiModelProperty("钻石邀请码")
    private String zsCode;
    /**
     * 邀请人ID
     */
    @Column(name = "`inviteUserID`")
    @ApiModelProperty("邀请人ID")
    private Integer inviteUserID;
    /**
     * 登录凭证
     */
    @Column(name = "`token`")
    @ApiModelProperty("登录凭证")
    private String token;
    /**
     * 钱包
     */
    @Column(name = "`wallet`")
    @ApiModelProperty("钱包")
    private BigDecimal wallet;
    /**
     * 支付宝账号
     */
    @Column(name = "`aliAccount`")
    @ApiModelProperty("支付宝账号")
    private String aliAccount;
    /**
     * 支付宝android应用openID
     */
    @Column(name = "`aliAndroidOpenId`")
    @ApiModelProperty("支付宝android应用openID")
    private String aliAndroidOpenId;

    /**
     * 支付宝ios应用openID
     */
    @Column(name = "`aliIosOpenId`")
    @ApiModelProperty("支付宝ios应用openID")
    private String aliIosOpenId;
    /**
     * 支付宝用户id
     */
    @Column(name = "`aliUserId`")
    @ApiModelProperty("支付宝用户id")
    private String aliUserId;

    /**
     * 微信公众号openid
     */
    @Column(name = "`wxMpOpenid`")
    @ApiModelProperty("微信公众号openid")
    private String wxMpOpenid;
    /**
     * 微信小程序openid
     */
    @Column(name = "`wxMaOpenid`")
    @ApiModelProperty("微信小程序openid")
    private String wxMaOpenid;
    /**
     * 微信AppOpenID
     */
    @Column(name = "`wxAppOpenid`")
    @ApiModelProperty("微信AppOpenID")
    private String wxAppOpenid;
    /**
     * 已推广数量
     */
    @Column(name = "`inviteNum`")
    @ApiModelProperty("已推广数量")
    private Integer inviteNum;
    /**
     * 置顶道具数量
     */
    @Column(name = "`topNum`")
    @ApiModelProperty("置顶道具数量")
    private Integer topNum;
    /**
     * 刷新道具数量
     */
    @Column(name = "`breakNum`")
    @ApiModelProperty("刷新道具数量")
    private Integer breakNum;
    /**
     * 钻石邀请码
     */
    @Column(name = "`wxCode`")
    @ApiModelProperty("微信号")
    private String wxCode;
    /**
     * 团队长名额
     */
    @Column(name = "`tdzNumber`")
    @ApiModelProperty("团队长名额")
    private Integer tdzNumber;
    /**
     * 剩余团队长名额
     */
    @Column(name = "`leftNumber`")
    @ApiModelProperty("剩余团队长名额")
    private Integer leftNumber;
    /**
     * 上级团队长ID
     */
    @Column(name = "`teamLeader`")
    @ApiModelProperty("上级团队长ID")
    private Integer teamLeader;
    /**
     * 上级服务商ID
     */
    @Column(name = "`service`")
    @ApiModelProperty("上级服务商ID")
    private Integer service;
    /**
     * 提现账号姓名
     */
    @Column(name = "`accountName`")
    @ApiModelProperty("提现账号姓名")
    private String accountName;
    /**
     * 客服微信
     */
    @Column(name = "`customer`")
    @ApiModelProperty("客服微信")
    private String customer;
    /**
     * 上级个人ID
     */
    @Column(name = "`person`")
    @ApiModelProperty("上级个人ID")
    private Integer person;
    /**
     * 密码
     */
    @Column(name = "`password`")
    @ApiModelProperty("密码")
    private String password;
    /**
     * 用户推广信息
     */
    @Transient
    @ApiModelProperty("用户推广信息")
    private UserPromotion userPromotion;

    @Transient
    @ApiModelProperty("服务商信息")
    private User fwsUser;

}
